package com.example.work;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Button nextPage = findViewById(R.id.nextPage);
        nextPage.setOnClickListener((v) -> {
            Intent intent =new Intent(MainActivity.this, MainActivity2.class);
            EditText userName=findViewById(R.id.userName);
            intent.putExtra("account",userName.getText().toString());
            startActivity(intent);
        });
    }
}